package com.xinqi.modules.sys.log.controller.inner;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.sys.log.service.OperatorLogService;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 操作日志记录内部控制层
 *
 * @author: yyzhen
 * @date: 2023/08/23
 */
@Hidden
@RestController
@RequestMapping("/inner/operator-log")
@RequiredArgsConstructor
public class OperatorLogInnerController {

    private final OperatorLogService operatorLogService;

    @Operation(summary = "新增操作日志记录")
    @PostMapping("/add")
    public R<Long> insert(@RequestBody Map<String, Object> map) {
        return R.data(operatorLogService.insert(map));
    }
}
